@extends('admin.main')
@section('head')
    <link rel="stylesheet" type="text/css" href="/admin/css/ncc.css">
    <link rel="stylesheet" type="text/css" href="/admin/css/sui.min.css">
    <style>
        body {
             font: 14px/1.5 "microsoft yahei", Helvetica, Tahoma, Arial, sans-serif;!important;
         }
        h3  {
            margin: 0;
        }
    </style>
@endsection
@section('body')
    <div class="main-title">
        <h2>店铺续费</h2>
    </div>
    <div class="tab-wrap">
        <div class="tab-content">

            <div class="ncc-main">
                <div class="sui-steps steps-auto">
                    <div class="wrap">
                        <div class="finished">
                            <label><span class="round"><i
                                            class="sui-icon icon-pc-right"></i></span><span>第一步：确认资费信息</span></label><i
                                    class="triangle-right-bg"></i><i class="triangle-right"></i>
                        </div>
                    </div>
                    <div class="wrap">
                        <div class="current">
                            <label><span class="round">2</span><span>第二步：支付订单</span></label><i
                                    class="triangle-right-bg"></i><i class="triangle-right"></i>
                        </div>
                    </div>
                    <div class="wrap">
                        <div class="todo">
                            <label><span class="round">3</span><span>第三步：完成</span></label>
                        </div>
                    </div>
                </div>
                <div class="ncc-receipt-info">
                    <div class="ncc-receipt-info-title">
                        <h3> <span style="color: green;font-weight:bold;">{{$shopInfo['shop_name']}}</span>，您的续费订单提交成功，请您尽快付款。 应付金额：<strong>{{$order['order_amount']}}</strong>元 </h3>
                    </div>
                </div>
                <table class="ncc-table-style">
                    <thead>
                    <tr>
                        <th class="w50"></th>
                        <th class="w200 tl">订单号</th>
                        <th class="w200 tl">套餐名</th>
                        <th class="w200 tl">续费期限 (年)</th>
                        <th class="tl">金额(元)</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <td></td>
                        <td class="tl">{{$order['order_sn']}}</td>
                        <td class="tl">{{$order['service_name']}}</td>
                        <td class="tl">{{$order['service_time']}}</td>
                        <td class="tl">{{$order['order_amount']}}</td>
                    </tr>
                    </tbody>
                </table>
                <div class="wxpayment">
                    <!-- 微信支付 -->
                    <div class="pay-weixin">
                        <div class="p-w-hd">微信支付</div>
                        <div class="p-w-bd">
                            <div class="p-w-box">
                                <div class="pw-box-hd"> {!! $img !!} </div>
                                <div class="pw-box-ft">
                                    <p>请使用微信扫一扫</p>
                                    <p>扫描二维码支付</p>
                                </div>
                            </div>
                            <div class="p-w-sidebar"></div>
                        </div>
                    </div>
                    <!-- 微信支付 end -->
                    <!-- payment-change 变更支付方式 -->
                {{--<div class="payment-change"> <a href="javascript:history.back(-1)" id="reChooseUrl" class="pc-wrap"> <i class="pc-w-arrow-left">&lt;</i> <strong>选择其他支付方式</strong> </a> </div>--}}
                <!-- payment-change 变更支付方式 end -->
                </div>
            </div>
            <script>
                $(document).ready(function () {
                    setTimeout("queryOrderState()", 1000);
                });

                function queryOrderState() {
                    $.ajax({
                        type: "GET",
                        url: "{!! urlAdmin('shop','getCheckOrderStatus',['id'=>$order['id']]) !!}&m=" + Math.random(),
                        data: "",
                        dataType: "json",
                        timeout: 4000,
                        success: function (result) {
                            if (result.status == 1) {
                                window.location.href = '{!!urlAdmin('shop','getCharge',['id'=>$shopInfo['id'],'admin_id'=>$shopInfo['admin_id'],'step'=>3])!!}';
                            }
                        }
                    });
                    setTimeout("queryOrderState()", 3000);
                }
            </script>

        </div>
    </div>

@endsection
